﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Dubs_Finder.ViewModel;

namespace Dubs_Finder.View
{
    /// <summary>
    /// Interaction logic for OptionsPanelUserControl.xaml
    /// </summary>
    public partial class OptionsPanelUserControl : UserControl
    {
        MainViewModel mvm;
        public OptionsPanelUserControl()
        {
            InitializeComponent();
            this.mvm = new ViewModelLocator().Main;
        }

        private void async_checked(object sender, RoutedEventArgs e)
        {
            this.mvm.runAsync = true;
        }

        private void async_unChecked(object sender, RoutedEventArgs e)
        {
            this.mvm.runAsync = false;
        }

        private void recursive_checked(object sender, RoutedEventArgs e)
        {
            if(this.mvm != null) this.mvm.runRecursive = true;
        }

        private void recursive_unChecked(object sender, RoutedEventArgs e)
        {
            this.mvm.runRecursive = false;
        }
    }
}
